<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head><title>JSF 2: Ajax Support</title>
<link href="./css/styles.css" rel="stylesheet" type="text/css"/> 
<script src="./scripts/utils.js" type="text/javascript"></script>
</h:head>
<h:body>
<div align="center">
<h1 class="title">JSF 2: Ajax Support</h1>
<br/>
<br/>
<h:form>
<fieldset>
  <legend>Population Lookup (with default event and chained comboboxes)</legend>
  State:
  <h:selectOneMenu value="#{locationBean.state}">
    <f:selectItem itemLabel="--Choose State--"/>
    <f:selectItems value="#{locationBean.states}"/>
    <f:ajax render="cityList population"/>
  </h:selectOneMenu>
  <br/>City:
  <h:selectOneMenu value="#{locationBean.cityPopulation}"
                   disabled="#{locationBean.cityListDisabled}"
                   id="cityList">
    <f:selectItem itemLabel="--Choose City--"/>
    <f:selectItems value="#{locationBean.cities}"/>
    <f:ajax render="population"/>
  </h:selectOneMenu>
  <br/><b>Population:
  <h:outputText value="#{locationBean.cityPopulation}" 
                id="population"/></b><br/><br/><br/><br/><br/>
</fieldset>
</h:form>
</div></h:body></html>

